<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
	<style>
	.one{
		color: green;
	}
	.two{
		color: #ff0000;
	}
	</style>
</head>

	<script type="text/javascript">
		var i = 1;
		document.write('<table border=1 align="center">');
		for(i; i<10; i++){
			document.write("<tr >");
			for(var j=1; j<=i; j++){
				if(i%2 == 0)
					document.write('<td class="one">'+i+'*'+j+'='+ i*j +'</td>');
				else
					document.write('<td class="two">'+i+'*'+j+'='+ i*j +'</td>');
			}
			document.write("<br/><tr>");
		}
		document("</table>");
	</script>
	
</html>